//
//  LCFileManager.h
//  iPhone
//
//  Created by dodo liu on 12-9-26.
//  Copyright (c) 2012年 臻昇￼科技. All rights reserved.
//

#import <Foundation/Foundation.h>
#import "ASIHTTPRequest.h"
#import "ASINetworkQueue.h"
#import "AppDelegate.h"
@protocol LCFileManagerDelegate<NSObject>
@optional
-(void)queueFilish:(NSString*)queueIdentifier;
@end

@interface LCFileManager : NSObject
{
    id<LCFileManagerDelegate>delegate;
     AppDelegate *APPDELE;//=[[UIApplication sharedApplication]delegate];
}

@property(nonatomic,strong)id<LCFileManagerDelegate>delegate;

//下载
-(void)downLoadFilesWithUrlArray:(NSArray*)urlArray //图片地址的数组
                  UIProgressView:(UIProgressView*)progressView //进度条视图
                 queueIdentifier:(NSString*)queueIdentifier //队例的标识
                      saveToPath:(NSString*)path //@"Documents/products12/"
                      folderName:(NSString*)foldername; //@"8"
                // theNetworkQueue:(ASINetworkQueue*)networkQueue;


-(void)downLoadFilesWithDatalArray:(NSArray*)dataArray 
                     dictionaryKey:(NSString*)ndKey//数组中的字典的键
                    UIProgressView:(UIProgressView*)progressView 
                   queueIdentifier:(NSString*)queueIdentifier 
                        saveToPath:(NSString*)path //@"Documents/products12/"
                        folderName:(NSString*)foldername ;//@"8"

//将image对象保存为jpg的本地文件
+ (void) saveImageAsJpgFile:(UIImage *)image path:(NSString *)path fileName:(NSString *)fileName;//path 全路径，例如：@"Documents/products/12"
//从url中获得文件名
+ (NSString*)getFileNameFormUrl:(NSString*)urlStr;
- (void) saveImageAsJpgFile:(UIImage *)image path:(NSString *)path fileName:(NSString *)fileName;//path 全路径，例如：@"Documents/products/12"

+ (void)deleteFloderInPath:(NSString*)path FolderName:(NSString*)folderName;
+ (void)deleteFileInPath:(NSString*)path FileName:(NSString*)FileName;
//根据路径返回图片数组 jpg 格式
- (NSMutableArray*)getAllPhotosWithPath:(NSString*)pathString;
@end
